﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Box.Entities;
namespace Box.Repository.Mapping
{
    public class MarcaMap : EntityTypeConfiguration<Marca>
    {

        public MarcaMap()
        {
            this.HasKey(p => p.Id);
            this.Property(p => p.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(p => p.NombreMarca)
                .IsRequired()
                .HasMaxLength(100);

            this.Property(p => p.NombreMarca)
                .IsRequired()
                .HasMaxLength(200);


            this.ToTable("MARCA");

            this.Property(p => p.Id).HasColumnName("Id");
            this.Property(p => p.NombreMarca).HasColumnName("NombreMarca");
            this.Property(p => p.DescripcionMarca).HasColumnName("DescripcionMarca");
    
        }
    }
}